import java.util.ArrayList;

import info.gridworld.actor.Actor;
import info.gridworld.grid.Location;
public class Obstruction extends Actor{
	private int damage, life;
	public Obstruction(int dam, int lif){
		life = lif;
		damage = dam;
	}
	public int getLife(){
		return life;
	}
	public void reduceLife(){
		life--;
	}
	public void act(){
		
		if(underenemy()){
			getEnemy().takeDamage(damage);
			reduceLife();
			if(getLife() == 0)
				removeSelfFromGrid();
		}
	}
	public boolean underenemy(){
		return false;
	}
	public Enemy getEnemy(){
		ArrayList<Location> locs = new ArrayList();
		Enemy cartman = new Enemy(locs);
		return cartman;
	}
}
